package com.yanqu.road.entity.activity.fivehero.cross;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@FieldTypeAnnotation(tableName = "t_c_activity_fivehero_match_data")
public class CrossFiveHeroMatchData extends DataObject {

    @FieldTypeAnnotation(desc = "活动ID", select = true, update = true)
    private int activityId;
    private int groupId;

    @FieldTypeAnnotation(desc = "所有城池数据")
    private Map<Integer, CrossFiveHeroCity> cityMap = new ConcurrentHashMap<>(); // 所有城池：阶段、城池ID、城池数据

    //三个阵营的经验值，不会溢出吧
    private Map<Integer,Integer>  expMap = new ConcurrentHashMap<>();
    //多少级了现在
    private Map<Integer,Integer>  expLevelMap = new ConcurrentHashMap<>();
    //阵营对应获得了多少积分了
    private Map<Integer,Long>  scoreMap = new ConcurrentHashMap<>();
    //阵营对应获得的每日战功 阵营id 天数 声望
    private Map<Integer,Map<Integer,Long>>  popMap = new ConcurrentHashMap<>();
    //阵营对应城市获得的积分 阵营id 天数 积分
    private Map<Integer,Map<Integer,Long>>  scoreCityMap = new ConcurrentHashMap<>();
    //阵营对应战令获得的积分 阵营id 天数 积分
    private Map<Integer,Map<Integer,Long>>  scoreTokenMap = new ConcurrentHashMap<>();
    //上次结算每晚积分时间
    private long scoreTime;

    private int matchId;

    // ===============================================


    public int getGroupId() {
        return groupId;
    }

    public void setGroupId(int groupId) {
        if(groupId != this.groupId){
            this.groupId = groupId;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public int getMatchId() {
        return matchId;
    }

    public void setMatchId(int matchId) {
        if(matchId != this.matchId){
            this.matchId = matchId;
            setUpdateOption();
        }
    }


    public Map<Integer, CrossFiveHeroCity> getCityMap() {
        return cityMap;
    }

    public void setCityMap(Map<Integer, CrossFiveHeroCity> cityMap) {
        this.cityMap = cityMap;
    }

    public Map<Integer, Integer> getExpMap() {
        return expMap;
    }

    public void setExpMap(Map<Integer, Integer> expMap) {
        this.expMap = expMap;
        setUpdateOption();
    }

    public Map<Integer, Integer> getExpLevelMap() {
        return expLevelMap;
    }

    public void setExpLevelMap(Map<Integer, Integer> expLevelMap) {
        this.expLevelMap = expLevelMap;
        setUpdateOption();
    }

    public Map<Integer, Long> getScoreMap() {
        return scoreMap;
    }

    public void setScoreMap(Map<Integer, Long> scoreMap) {
        this.scoreMap = scoreMap;
        setUpdateOption();
    }

    public long getScoreTime() {
        return scoreTime;
    }

    public void setScoreTime(long scoreTime) {
        if(scoreTime != this.scoreTime){
            this.scoreTime = scoreTime;
            setUpdateOption();
        }
    }

    public Map<Integer, Map<Integer, Long>> getScoreCityMap() {
        return scoreCityMap;
    }

    public void setScoreCityMap(Map<Integer, Map<Integer, Long>> scoreCityMap) {
        this.scoreCityMap = scoreCityMap;
        setUpdateOption();
    }

    public Map<Integer, Map<Integer, Long>> getScoreTokenMap() {
        return scoreTokenMap;
    }

    public void setScoreTokenMap(Map<Integer, Map<Integer, Long>> scoreTokenMap) {
        this.scoreTokenMap = scoreTokenMap;
        setUpdateOption();
    }

    public Map<Integer, Map<Integer, Long>> getPopMap() {
        return popMap;
    }

    public void setPopMap(Map<Integer, Map<Integer, Long>> popMap) {
        this.popMap = popMap;
        setUpdateOption();
    }
}
